home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 June: Reference Library / Dev.CD Jun 99 RL Disk 2.toast / Technical Publications / mac / AppleScriptLang / runsed < prev    next >
Encoding:
Text File  |  1999-03-02  |  372 b   |  20 lines  |  [BINA/hDmp]

  1. for x
  2. do
  3. echo "editing $x: \c"
  4. if test "$x" = sedscr; then
  5.     echo "not editing sedscript!"
  6. elif test -s $x; then
  7.     sed -f sedscr $x > /tmp/$x
  8.     if test -s /tmp/$x
  9.     then
  10.     cmp -s $x /tmp/$x && echo "file not changed: \c";\
  11.         cp /tmp/$x $x;echo "done"
  12.     else
  13.     echo "Sed produced an empty file - check sed script."
  14.     fi
  15. else
  16.     echo "original file is empty."
  17. fi
  18. done
  19. echo "all done"
  20.